

select *
from loja_entradas a
where substring(a.filial,1,3) = '525'
and
substring(a.filial_origem,1,3) =  '095'
and cast(numero_nf_transferencia as int) in (1069,1070,1068)
order by numero_nf_transferencia

select *
from loja_entradas a
where substring(a.filial,1,3) = '525'
and
substring(a.filial_origem,1,3) =  '128'
and cast(numero_nf_transferencia as int) in (711,713)
order by numero_nf_transferencia

select *
from loja_entradas a
where substring(a.filial,1,3) = '525'
and
substring(a.filial_origem,1,3) =  '999'
and ltrim(numero_nf_transferencia) = '280218'
order by numero_nf_transferencia